#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <iostream>
using namespace std;

struct sword
{
    int length;
    int num;
}s[55];

int cmp(sword a,sword b)
{
    return a.length<b.length;
}

int main()
{
    int t;
    scanf("%d",&t);
    while ( t-- )
    {
        int n;
        scanf("%d",&n);
        int a,b;
        for (int i=0;i<n;i++)
        {
            scanf("%d%d",&a,&b);
            for (int j=0)
        }
    }
}
